﻿<UserControl x:Class="Demo.GraphViewer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid x:Name="LayoutRoot"
          Background="White">

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel x:Name="sourcePanel"
                    Visibility="Collapsed">
            <TextBlock Text="Select the source and press play. You can choose between provided samples or select local file."
                       TextWrapping="Wrap"
                       Margin="10" />

            <Border Background="{StaticResource NavigationBackgroundColorBrush}"
                    Grid.Row="1">
                <StackPanel Width="200">
                    <TextBlock Text="Source"
                               Style="{StaticResource ApplicationNameStyle}" />
                    <Grid x:Name="sourceGrid">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <RadioButton Content="Sample"
                                     x:Name="sampleSource"
                                     GroupName="source"
                                     Foreground="{StaticResource NavigationForegroundColorBrush}"
                                     Margin="4"
                                     Grid.Row="0"
                                     Grid.Column="0" />

                        <ComboBox x:Name="samples"
                                  SelectionChanged="samples_SelectionChanged"
                                  Margin="4"
                                  Grid.Row="0"
                                  Grid.Column="1" />

                        <RadioButton Content="Local file"
                                     x:Name="localSource"
                                     Foreground="{StaticResource NavigationForegroundColorBrush}"
                                     GroupName="source"
                                     VerticalAlignment="Center"
                                     Margin="4"
                                     Grid.Row="1"
                                     Grid.Column="0" />

                        <Button Content="Browse"
                                Margin="4"
                                Style="{StaticResource ButtonStyle}"
                                Click="Browse_Click"
                                Grid.Row="1"
                                Grid.Column="1" />

                    </Grid>
                </StackPanel>
            </Border>
        </StackPanel>

        <Border Grid.Row="2"
                Margin="10"
                BorderBrush="{StaticResource HighLightColorBrush}"
                BorderThickness="2"
                HorizontalAlignment="Center">
            <!--<StackPanel x:Name="mediaContainer"
                        Orientation="Horizontal"
                        HorizontalAlignment="Center"
                        Height="200" />-->
            <Grid x:Name="mediaContainer" />
        </Border>

        <StackPanel Orientation="Horizontal"
                    Background="{StaticResource NavigationBackgroundColorBrush}"
                    Grid.Row="3"
                    Visibility="Collapsed"
                    x:Name="controlPanel">
            <Button Content="Play"
                    Style="{StaticResource ButtonStyle}"
                    Click="Play_Click"
                    Margin="2" />
            <Button Content="Pause"
                    Style="{StaticResource ButtonStyle}"
                    Click="Pause_Click"
                    Margin="2" />
            <Button Content="Stop"
                    Style="{StaticResource ButtonStyle}"
                    Click="Stop_Click"
                    Margin="2" />
        </StackPanel>
        <StackPanel Orientation="Horizontal"
                    Background="{StaticResource NavigationBackgroundColorBrush}"
                    Grid.Row="3"
                    Visibility="Collapsed"
                    x:Name="waitPanel">
            <TextBlock Text="Please wait, loading..."
                       Style="{StaticResource ApplicationNameStyle}" />

        </StackPanel>
    </Grid>
</UserControl>
